% function of reflection
% qz,qc,beta,lambda
function out=FresnelReflection(qz,qc,beta,lambda)
% qz qc beta lambda
%(sign(qz-qf)+1)/2-D*qz.*(sign(qz-qf)-1)/2;
t=2*qz./(qz+sqrt(qz.^2-qc^2+32*i*pi^2*beta/lambda^2));
r=1-t;
out=abs(r.*conj(r));